@extends('layout.index')

@section('content')
	<div class="mws-panel grid_8">
	<div class="mws-panel-header">
    	<span>商品添加</span>
    </div>
    <div class="mws-panel-body no-padding">
		
		<!-- @if(session('error'))
		<div class="mws-form-message error">
        	{{session('error')}}
        </div>
        @endif
 -->

        @if (count($errors) > 0)
		   <div class="mws-form-message error">
		        <ul>
		            @foreach ($errors->all() as $error)
		                <li>{{ $error }}</li>
		            @endforeach
		        </ul>
		    </div>
		@endif

    	<form action="/admin/goods/insert" method='post' class="mws-form" enctype="multipart/form-data">
    		<div class="mws-form-inline">
    			<div class="mws-form-row">
    				<label class="mws-form-label">商品名:</label>
    				<div class="mws-form-item">
    					<input type="text" name='goodsname'class="small">
    				</div>
    			</div>
    			<div class="mws-form-row">
    				<label class="mws-form-label">商品图片:</label>
    				<div class="mws-form-item" >
    					<div class='small'>
    						<input type="file" name='goodspic'>
    					</div>
    				</div>
    			</div>  
    			<div class="mws-form-row">
    				<label class="mws-form-label">商品价格:</label>
    				<div class="mws-form-item">
    					<input type="text" name='goodsprice' class="small">
    				</div>
    			</div>  
    			<div class="mws-form-row">
    				<label class="mws-form-label">商品数量:</label>
    				<div class="mws-form-item">
    					<input type="text" name='goodsnum'class="small">
    				</div>
    			</div>  
    			<div class="mws-form-row">
    				<label class="mws-form-label">商品描述:</label>
    				<div class="mws-form-item">
    					<input type="text" name='goodsdesc'class="small">
    				</div>
    			</div>   			
    		</div>
    		<div class="mws-button-row">
    			{{ csrf_field() }}
    			<input type="submit" class="btn btn-danger" value="提交">
    			<input type="reset" class="btn " value="重置">
    		</div>
    	</form>
    </div>    	
</div>
@endsection